package com.im.service.infra.repository;

import com.im.service.infra.entity.ChatHistory;
import lombok.RequiredArgsConstructor;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.ReactiveMongoRepository;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Flux;

@Repository
public interface ChatHistoryRepository extends ReactiveMongoRepository<ChatHistory, String> {

    Flux<ChatHistory> findChatHistoriesByReceiverIdAndForwardSuccessTimeIsNull(String userId);
}
